<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>进度条</title>
  <link href="css/bootstrap.min.css" rel="stylesheet"/>
  <script src="js/jquery-3.3.1.min.js"></script>
  <script src="js/bootstrap.min.js"></script>
  <script>
    $(function (){
      $("#download").click(function (){
         setInterval(function (){
           document.getElementById("prodiv").width+=20;
           // var width=$("#prodiv").prop("width")+20;
           // $("#prodiv").css("width",width);
         },1000);
      });
    });

  </script>
</head>
<body>
<div class="progress">
  <div id="prodiv" class="progress-bar" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
    0%
  </div>
</div>
<button class="btn btn-primary" id="download">开始下载</button>
</body>
</html>